#!/bin/bash

DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"

function error {
  echo -e "\\e[91m$1\\e[39m"
  exit 1
}

"${DIRECTORY}/pkg-install" "python3 python3-pyqt5 python3-pyqt5.qtwebkit python3-pip gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-alsa gstreamer1.0-libav" "$(dirname "$0")" || error "Failed to install dependencies!"

cd $HOME
rm -rf quartz-browser-qt5 || sudo rm -rf quartz-browser-qt5 
git clone https://github.com/ksharindam/quartz-browser-qt5
cd quartz-browser-qt5
pip3 install . || sudo pip3 install . 
